Skip to content

perf: harden dedicated loop and optimize pmove hot paths#5

Open
crazycusti wants to merge 1 commit intoquakeshack:mainfrom
crazycusti:fix/dedicated-perf-guards
Open

perf: harden dedicated loop and optimize pmove hot paths#5
crazycusti wants to merge 1 commit intoquakeshack:mainfrom
crazycusti:fix/dedicated-perf-guards

Conversation

@crazycusti
Copy link

Summary

This PR bundles dedicated-server performance and stability fixes for weak devices:

  • add server-side guards for message/tick processing to avoid runaway frame time under backlog
  • cap and protect network receive queue growth in websocket path
  • reduce Pmove hotpath allocations with reusable scratch objects and less per-command object churn
  • improve dedicated static file path resolution when launched from bundled dist/dedicated.mjs
  • add a dedicated Vite build target and production console stripping

Files changed

  • dedicated.mjs
  • package.json
  • vite.config.dedicated.mjs
  • source/engine/common/Pmove.mjs
  • source/engine/network/Network.mjs
  • source/engine/network/NetworkDrivers.mjs
  • source/engine/server/Com.mjs
  • source/engine/server/Navigation.mjs
  • source/engine/server/Server.mjs
  • source/engine/server/Sys.mjs
  • source/engine/server/physics/ServerClientPhysics.mjs

Validation

  • npm run build:production
  • npm run build:dedicated:production

Both builds pass locally.

Notes

  • This branch is 1 commit ahead of origin/main.
  • Commit: a844c82a4776051a60b86e25db61aae789ceeb7a

- add queue/tick guards for weak devices
- reduce pmove allocations via scratch reuse
- add dedicated Vite build with console stripping
- fix static webroot resolution for dist dedicated startup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant